package cn.phecda.boot.tenant.data.jpa;

import cn.phecda.boot.data.jpa.entity.AbstractStatusJpaEntity;
import cn.phecda.boot.tenant.core.entity.TenantEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.persistence.Column;
import jakarta.persistence.MappedSuperclass;
import org.hibernate.annotations.TenantId;

/**
 * <p> 租户状态实体 </p>
 *
 * @author : wanpinwei
 */
@MappedSuperclass
public abstract class AbstractTenantStatusJpaEntity extends AbstractStatusJpaEntity implements TenantEntity {
    @Schema(description = "租户ID")
    @Column(name = "tenant_id", nullable = false, updatable = false)
    @TenantId
    private String tenantId;

    @Override
    public String getTenantId() {
        return tenantId;
    }

    @Override
    public void setTenantId(String tenantId) {
        this.tenantId = tenantId;
    }
}
